﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using FunctionPoint.Common;
using System.Collections.ObjectModel;

namespace FunctionPoint.ViewModels
{
    /// <summary>
    /// Used for populating the FunctionPointExplorerToolWindow in the VSPackage 
    /// </summary>
    [Serializable]
    public class FunctionPointSelectorToolWindowViewModel
    : DependencyObject
    {
        public static readonly DependencyProperty QueryHierarchyFlatProperty =
            DependencyProperty.Register("QueryHierarchyFlat", typeof(ObservableFlattenedQueryHierarchy), typeof(FunctionPointSelectorToolWindowViewModel));

        public static readonly DependencyProperty QueryHierarchyProperty =
            DependencyProperty.Register("QueryHierarchy", typeof(ObservableCollection<QueryItemBase>), typeof(FunctionPointSelectorToolWindowViewModel));


        public ObservableCollection<QueryItemBase> QueryHierarchy
        {
            get
            {
                return (ObservableCollection<QueryItemBase>)GetValue(QueryHierarchyProperty);
            }
            set
            {
                SetValue(QueryHierarchyProperty, value);
            }
        }
        public ObservableFlattenedQueryHierarchy QueryHierarchyFlat
        {
            get
            {
                return (ObservableFlattenedQueryHierarchy)GetValue(QueryHierarchyFlatProperty);
            }
            set
            {
                SetValue(QueryHierarchyFlatProperty, value);
            }
        }

    }
}
